package com.kakame.ahasekai.biz.user;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserController {
	
	@Resource
	private UserService userService;
	
	@GetMapping("/insert")
	public void insert(UserVo user) {
		userService.insert(user);
	}
	
	@ResponseBody
	@GetMapping("/get")
	public UserVo get(String userId) {
		return userService.findById(userId);
	}
}
